package top.mccat.shirospring.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.mccat.shirospring.dao.UserDao;
import top.mccat.shirospring.pojo.User;
import top.mccat.shirospring.service.UserService;

/**
 * @author raven
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserDao, User> implements UserService {
    @Autowired
    private UserDao userDao;
    @Override
    public User queryUserByName(String name) {
        QueryWrapper<User> wrapper = new QueryWrapper<>();
        wrapper.like("username",name);
        return userDao.selectOne(wrapper);
    }
}
